package com.alinesno.cloud.initializr.starter.gateway;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alinesno.cloud.initializr.starter.service.IStaticService;
import com.alinesno.cloud.initializr.starter.vo.StaticDataVo;

/**
 * @author WeiXiaoJin
 * @date 2021/10/12
 */
@RestController
public class StaticDataRest {

    @Autowired
    IStaticService staticService;

    /**
     * 获取统计数据
     *
     * @return
     */
    @GetMapping("com/alinesno/cloud/initializr/statics")
    public StaticDataVo fetchStaticData() {
        return staticService.computeStatic();
    }

}
